
var app = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },


    onLoad() {
    
    },

    project(){
        wx.switchTab({
          url: '/pages/car/quotaion',
        })
    },

    lists(){
        wx.switchTab({
            url: '/pages/list/index',
          })
    },

    me(){
      wx.switchTab({
        url: '/pages/my/my',
      })
    },
    switchTab(){
      wx.switchTab({
        url: '/pages/index/index',
      })
    },

    scanCodeEvent: function(){
      var that = this;
      wx.scanCode({
        onlyFromCamera: true,// 只允许从相机扫码
        success(res){
          JSON.stringify(res)
          console.log(res.result)
          
          wx.navigateTo({
            url: '/pages/about/update?code='+res.result,
          })
   
        },
        fail(ret){
          console.log(ret);
          wx.showToast({
            title: ret.errMsg,
            icon:'none'
          })
        }
      })
    },
})